package com.patterns.decorator;

public class Test {
	public static void main(String[] args) {
		PeopleComponent people = new PeopleConcreteComponent();// 普通人
		people.doing();//一个不会做任何事情的人
		
		PeopleDecorator sing_people = new SingPeopleConcreteDecorator(people); // 装饰唱歌功能
		sing_people.doing();//一个不会做任何事情的人  、会唱歌
		
		//装饰唱歌和说话功能 
		PeopleDecorator sing_talk_people = new SingPeopleConcreteDecorator(new TalkPeopleConcreteDecorator(people));
		sing_talk_people.doing();//一个不会做任何事情的人、会说话、会唱歌
		
		
	}
}
